import request from '@/utils/request'

// 查询物资入库列表
export function listWzrk(query) {
  return request({
    url: '/wzgl/wzrk/list',
    method: 'get',
    params: query
  })
}

// 查询物资入库详细
export function getWzrk(wzrkId) {
  return request({
    url: '/wzgl/wzrk/' + wzrkId,
    method: 'get'
  })
}

// 确定入库
export function qdrk(wzrkId) {
  return request({
    url: '/wzgl/wzrk/qdrk/' + wzrkId,
    method: 'put'
  })
}

// 新增物资入库
export function addWzrk(data) {
  return request({
    url: '/wzgl/wzrk',
    method: 'post',
    data: data
  })
}

// 修改物资入库
export function updateWzrk(data) {
  return request({
    url: '/wzgl/wzrk',
    method: 'put',
    data: data
  })
}

// 删除物资入库
export function delWzrk(wzrkId) {
  return request({
    url: '/wzgl/wzrk/' + wzrkId,
    method: 'delete'
  })
}

// 根据模板导出word
export function exportWzrkWord(query, wzrkId) {
  return request({
    url: '/wzgl/wzrk/exportWord/' + wzrkId,
    method: 'get',
    params: query
  })
}

// 本月入库单量
export function getByRkDl() {
  return request({
    url: '/wzgl/wzrk/getByRkDl',
    method: 'get'
  })
}

// 本月出库单量
export function getByCkDl() {
  return request({
    url: '/wzgl/wzrk/getByCkDl',
    method: 'get'
  })
}

// 采购物资数量top10
export function selectWzRkl() {
  return request({
    url: '/wzgl/wzrk/selectWzRkl',
    method: 'get'
  })
}

// 近6个月每个月的总额
export function selectRkZeByMonth() {
  return request({
    url: '/wzgl/wzrk/selectRkZeByMonth',
    method: 'get'
  })
}
